package bbs.service;

import java.util.List;

import bbs.entity.po.ForumArticleAttachment;
import bbs.entity.query.ForumArticleQuery;
import bbs.entity.po.ForumArticle;
import bbs.entity.vo.PaginationResultVO;
import org.springframework.web.multipart.MultipartFile;


/**
 * 文章信息 业务接口
 */
public interface ForumArticleService {

	/**
	 * 根据条件查询列表
	 */
	List<ForumArticle> findListByParam(ForumArticleQuery param);

	/**
	 * 根据条件查询列表
	 */
	Integer findCountByParam(ForumArticleQuery param);

	/**
	 * 分页查询
	 */
	PaginationResultVO<ForumArticle> findListByPage(ForumArticleQuery param);

	/**
	 * 新增
	 */
	Integer add(ForumArticle bean);

	/**
	 * 批量新增
	 */
	Integer addBatch(List<ForumArticle> listBean);

	/**
	 * 批量新增/修改
	 */
	Integer addOrUpdateBatch(List<ForumArticle> listBean);

	/**
	 * 多条件更新
	 */
	Integer updateByParam(ForumArticle bean,ForumArticleQuery param);

	/**
	 * 多条件删除
	 */
	Integer deleteByParam(ForumArticleQuery param);

	/**
	 * 根据ArticleId查询对象
	 */
	ForumArticle getForumArticleByArticleId(String articleId);


	/**
	 * 根据ArticleId修改
	 */
	Integer updateForumArticleByArticleId(ForumArticle bean,String articleId);


	/**
	 * 根据ArticleId删除
	 */
	Integer deleteForumArticleByArticleId(String articleId);

	/**
	 * 读取文章信息
	 * @param articleId
	 * @return
	 */
	ForumArticle readArticle(String articleId);

	/**
	 * 发布图片
	 * @param forumArticle
	 * @param forumArticleAttachment
	 * @param cover
	 * @param attachment
	 */
	void postArticle(Boolean isAdmin, ForumArticle forumArticle, ForumArticleAttachment forumArticleAttachment, MultipartFile cover, MultipartFile attachment);

	/**
	 * 修改图片
	 * @param isAdmin
	 * @param forumArticle
	 * @param forumArticleAttachment
	 * @param cover
	 * @param attachment
	 */
	void updateArticle(Boolean isAdmin, ForumArticle forumArticle, ForumArticleAttachment forumArticleAttachment, MultipartFile cover, MultipartFile attachment);

	void delArticle(String articleId);

	void delArticleSingle(String articleId);

	void UpdateBoard(String articleId, Integer pBoardId, Integer BoardId);

	void auditArticle(String articleId);

	void auditArticleSignle(String articleId);
}